package com.ls.pattern.state.v2.model;

import com.ls.pattern.state.v2.OrderStateEnum;
import com.ls.pattern.state.v2.OrderStateMachine;

public interface OrderState {

    OrderStateEnum orderStateType();

    default void pay(OrderStateMachine stateMachine) {
        System.out.println("|--当前订单状态不支持支付，已忽略");
    }

    default void cancel(OrderStateMachine stateMachine) {
        System.out.println("|--当前订单状态不支持取消，已忽略");
    }

    default void deliver(OrderStateMachine stateMachine) {
        System.out.println("|--当前订单状态不支持发货，已忽略");
    }

    default void receive(OrderStateMachine stateMachine) {
        System.out.println("|--当前订单状态不支持收货，已忽略");
    }

    default void refund(OrderStateMachine stateMachine) {
        System.out.println("|--当前订单状态不支持退款，已忽略");
    }

    default void confirmRefund(OrderStateMachine stateMachine) {
        System.out.println("当前订单状态不支持确认退款，已忽略");
    }

}
